const multer = require('@koa/multer');
const storage = multer.diskStorage({
    destination: (req, file, cb) => {
        cb(null, '../public/'); // 设置上传文件的存储路径
    },
    filename: (req, file, cb) => {
        cb(null, Date.now() + '-' + file.originalname); // 设置文件名
    }
});
const upload = multer({ storage: storage });
module.exports=upload
